Skip to contentSkip to conversation

question to crypt_format function

dm-crypt Stephan Giehlow 3 participants 5 messages Oct 20, 2015 – Oct 21, 2015

lore
Share & tools
lore
#0 lore raw

Hi,

we are using libcryptsetup to generate a luks container on an arm device. The developed code comes from your example
(https://gitlab.com/cryptsetup/cryptsetup/wikis/API/crypt_luks_usage_8c-ex
ample.html). But we have one problem: When running the code on the device, the crypt_format function will ends with the error “Cannot initialize crypto backend”. Do you have any tip to solve the error?

Thanks for help.

Stephan Giehlow

im Auftrag

OpenLimit SignCubes AG

Zugerstrasse 74

CH-6341 Baar

Kanton Zug

Switzerland

Tel: +49 30 400 35 10 - 10

E-Mail: <mailto:[email protected]> [email protected]

Web: <https://www.openlimit.com/> https://www.openlimit.com/

---

Nutzen Sie OpenLimit Signaturlösungen für die rechtssichere Digitalisierung gemäß BSI TR RESISCAN.

<https://www.openlimit.com/de/loesungen/ersetzendes-scannen.html>
https://www.openlimit.com/de/loesungen/ersetzendes-scannen.html

<https://www.bsi.bund.de/DE/Publikationen/TechnischeRichtlinien/tr03138/in
dex_htm.html>
https://www.bsi.bund.de/DE/Publikationen/TechnischeRichtlinien/tr03138/ind
ex_htm.html

#1 lore raw

Hello,

does the same thing happen when you run cryptsetup manually from a commandline? In particular, what are the last steps printed when you do it manually with the '--debug' option?

Regards,
Arno Wagner

Quoted 56 lines · Stephan Giehlow

Hi,

we are using libcryptsetup to generate a luks container on an arm device. The developed code comes from your example
(https://gitlab.com/cryptsetup/cryptsetup/wikis/API/crypt_luks_usage_8c-ex
ample.html). But we have one problem: When running the code on the device, the crypt_format function will ends with the error “Cannot initialize crypto backend”. Do you have any tip to solve the error?

Thanks for help.

Stephan Giehlow

im Auftrag

OpenLimit SignCubes AG

Zugerstrasse 74

CH-6341 Baar

Kanton Zug

Switzerland

Tel: +49 30 400 35 10 - 10

E-Mail: <mailto:[email protected]> [email protected]

Web: <https://www.openlimit.com/> https://www.openlimit.com/

---

Nutzen Sie OpenLimit Signaturlösungen für die rechtssichere Digitalisierung gemäß BSI TR RESISCAN.

<https://www.openlimit.com/de/loesungen/ersetzendes-scannen.html>
https://www.openlimit.com/de/loesungen/ersetzendes-scannen.html

<https://www.bsi.bund.de/DE/Publikationen/TechnischeRichtlinien/tr03138/in
dex_htm.html>
https://www.bsi.bund.de/DE/Publikationen/TechnischeRichtlinien/tr03138/ind
ex_htm.html

_______________________________________________
dm-crypt mailing list
[email protected]
http://www.saout.de/mailman/listinfo/dm-crypt

Signature · 7 lines
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: [email protected]
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier
#2 lore raw
In reply to Stephan Giehlow
Quoted 6 lines · Stephan Giehlow

we are using libcryptsetup to generate a luks container on an arm device. The developed code comes from your example
(https://gitlab.com/cryptsetup/cryptsetup/wikis/API/crypt_luks_usage_8c-example.html).
But we have one problem: When running the code on the device, the crypt_format function will ends with the error “Cannot initialize crypto backend”. Do you have any tip to solve the error?

Something is probably misconfigured on your system.

If cryptsetup binary itself works, try to add debug info to your program:

crypt_set_debug_level(CRYPT_DEBUG_ALL);

and also try to strace it (do not use valuable password though:)

If it there is still not useful explanation in log, please send the output of these logs.

Thanks,
Milan

#3 lore raw

Hi,

thanks for the fast answer. The cryptsetup binary itself works on the arm device. I added debug logging to my source. When I perform the crypt_format function I can see the Log "#Crypto backend () initialized". On my developer virtual machine are more information - like "#Crypto backen (Linux 3.7.10-1.32-desktop kernel CryptoAPI) initialized".

Is there any missing additional call to initialize any crypto backend?

Thanks,
Stephan

-----Ursprüngliche Nachricht-----
Von: Milan Broz [mailto:[email protected]]
Gesendet: Dienstag, 20. Oktober 2015 20:24
An: Stephan Giehlow <[email protected]>; [email protected]
Betreff: Re: [dm-crypt] question to crypt_format function

Quoted 3 lines · Stephan Giehlow

we are using libcryptsetup to generate a luks container on an arm device. The developed code comes from your example

(https://gitlab.com/cryptsetup/cryptsetup/wikis/API/crypt_luks_usage_8c-ex
ample.html).

Quoted 3 lines

But we have one problem: When running the code on the device, the crypt_format function will ends with the error “Cannot initialize crypto backend”. Do you have any tip to solve the error?

Something is probably misconfigured on your system.

If cryptsetup binary itself works, try to add debug info to your program:

crypt_set_debug_level(CRYPT_DEBUG_ALL);

and also try to strace it (do not use valuable password though:)

If it there is still not useful explanation in log, please send the output of these logs.

Thanks,
Milan

#4 lore raw
Quoted 9 lines · Stephan Giehlow

Hi,

thanks for the fast answer. The cryptsetup binary itself works on the arm device. I added debug logging to my source. When I perform the crypt_format function I can see the Log "#Crypto backend () initialized". On my developer virtual machine are more information - like "#Crypto backen (Linux 3.7.10-1.32-desktop kernel CryptoAPI) initialized".

Is there any missing additional call to initialize any crypto backend?

No, it should be automatic. (The example works as it is in sources.) So it depends what crypto backend libcryptsetup was compiled for (empty string in message is definitely wrong), you apparently
use non-standard configuration (kernel crypto API is not default backend).

Anyway, I cannot say more without reading logs and strace.

Milan